package cn.melonlib.aap.user.model.view;

import cn.melonlib.aap.user.model.entity.Account;
import cn.melonlib.aap.user.model.enums.AccountType;
import cn.melonlib.cores.commons.model.entity.StringIdEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;

@Data
@EqualsAndHashCode(callSuper = true)
@ModelComment("登陆认证结果信息")
public class ProfileView extends StringIdEntity {

    public ProfileView(Account account,String name,String token){
        this.token=token;
        BeanUtils.copyProperties(account,this);
        this.accountTypes=account.getAccountTypes();
        this.name=name;
    }

    @ModelComment("登陆会话")
    private String token;

    @ModelComment("账户名称")
    private String account;

    @ModelComment("名称")
    private String name;

    @ModelComment("登陆人学校")
    private String tenant;

    @ModelComment("登陆人学校ID")
    private String tenantId;

    @ModelComment("登陆人身份")
    private String accountTypes;

}
